package org.game.ddd.editor;

import de.felixroske.jfxsupport.AbstractJavaFxApplicationSupport;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
import javafx.util.Callback;
import org.game.ddd.editor.constant.ApiConstant;
import org.game.ddd.editor.screen.CustomBootScreen;
import org.game.ddd.editor.view.MainView;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.net.URL;

@SpringBootApplication
public class DDDMapEditorApplication extends AbstractJavaFxApplicationSupport {

    public static void main(String[] args) {
        launch(DDDMapEditorApplication.class, MainView.class, new CustomBootScreen(), args);
    }

    @Override
    public void start(Stage stage) throws Exception {
        super.start(stage);
        ApiConstant.stage = stage;
        initWindowSetting(stage);
    }

    private void initWindowSetting(Stage stage) {
        stage.setMaximized(true);
        stage.setMinWidth(600);
        stage.setMinHeight(400);
    }
}